<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
		<title>惠优世家</title>
		<link rel="stylesheet" href="css/bootstrap.min.css">
		<link rel="stylesheet" href="css/main.css">
		<link rel="stylesheet" href="css/index.css">
		<script src="dist/layer/layer.js" type="text/javascript"></script>
		<script src="js/Common.js" type="text/javascript"></script>
		<script src="js/jquery-3.2.1.min.js" type="text/javascript"></script>
		<!--1112-->
		<!--encrypt-->
		<script src="dist/encrypt/jsencrypt.js" type="text/javascript"></script>
		<script src="dist/encrypt/des.js" type="text/javascript"></script>
		<script src="dist/encrypt/public.js" type="text/javascript"></script>
	</head>
	<script>
		$(function() {
			getImgCode();
		})

		function getImgCode() {
			$.ajax({
				type: "get",
				dataType: "json",
				url: GetUrl() + "/data/api/get_verify_img_code?visitType=web",
				timeout: 30000,
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					msgError("验证码加载失败,请刷新页面");
				},
				success: function(data) {
					console.log(data);
					if(data.code == 000) {
						console.log(data.data.url);
						setCookie("img_id", data.data.id);
						$('#code_img').attr('src', data.data.url);
					} else {
						msgError(data.msg);
					}
				}
			});
		}
	</script>

	<body>
		<div class="sh-yh-bg">
			<img src="img/web_register.png" />
		</div>
		<div class="sh-yh-phone-register">
			<div class="sh-yh-phone-img">
				<img src="img/web_register_top.png" />
			</div>
			<div class="sh-yh-phone-content">
				<div class="form-group has-feedback">
					<div class="input-group">
						<span class="input-group-addon">
					<img src="img/phone.png" />
				</span>
						<input type="text" class="form-control" id="phone" placeholder="请输入您的手机号">
					</div>
				</div>
				<div class="sh-yh-phone-content-validation">
					<div class="pull-left" style="width: 64%;">
						<div class="input-group">
							<span class="input-group-addon" style="padding: 6px 5px;">
						<img src="img/email.png" /></span> <input style="border: none; height:47px;padding: 6px 10px;font-size: 1rem;" type="text" class="form-control" id="validation9" placeholder="请输入图形码">
						</div>
					</div>
					<div class="pull-right sh-yh-phone-content-validation-btn" style="width: 36%;">
						<img id="code_img" src="" style="width:100%; height:45px; " onclick="getImgCode()">
					</div>
					<div class="clearfix"></div>
				</div>
				<div class="sh-yh-phone-content-validation">
					<div class="pull-left" style="width: 64%;">
						<div class="input-group">
							<span class="input-group-addon" style="padding: 6px 5px;">
								<img src="img/email.png" onclick="getImgCode()"/></span>
							<input style="border: none; height:47px;padding: 6px 10px;font-size: 1rem;" type="text" class="form-control" id="validation" placeholder="请输入验证码">
						</div>
					</div>
					<div class="pull-right sh-yh-phone-content-validation-btn">
						<button class="btn" id="send-validation">获取验证码</button>
					</div>
					<div class="clearfix"></div>
				</div>
				<div class="form-group has-feedback">
					<div class="input-group">
						<span class="input-group-addon"><img
					src="img/password.png" /></span> <input type="password" class="form-control" id="password" placeholder="请输入密码">
					</div>
				</div>
				<div class="form-group has-feedback sh-yh-phone-content-input-last">
					<div class="input-group">
						<span class="input-group-addon"><img
					src="img/password.png" /></span> <input type="password" class="form-control" id="repassword" placeholder="请再次输入密码">
					</div>
				</div>
			</div>
			<div class="sh-yh-phone-btn btn">
				<botton id="regist" />立即注册</botton>
			</div>
			<div class="sh-yh-phone-down">
				<div class="sh-yh-phone-down-button">
					<a class="mui-next" href="https://www.pgyer.com/PuAA">已注册请点击这里下载</a>
				</div>
			</div>
		</div>
	</body>

</html>
<script src="dist/mui/js/mui.min.js" type="text/javascript"></script>
<script src="js/MD5.js"></script>
<script src="js/register.js"></script>
<script src="js/main.js"></script>
<script type="text/javascript">
	//注册按钮
	mui('body').on('tap', '.sh-yh-phone-btn', function() {
		register();
	});
	// 点击获取验证码按钮获取验证码
	mui('body').on('tap', '#send-validation', function() {
		//手机号码有没有注册过
		isPhoneRegist();
	});

	mui('body').on('tap', '.mui-next', function() {
		window.top.location.href = this.href;
	});
</script>